package com.roamer.audition.common.request;

import com.roamer.validator.gruop.Add;
import com.roamer.validator.gruop.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * 公司
 *
 * @author roamer
 * @version V1.0
 * @date 2019-08-20 22:34
 */
@ApiModel(value = "公司DTO")
@Data
public class CompanyDTO implements Serializable {

    private static final long serialVersionUID = -3970151671693156636L;

    @ApiModelProperty(value = "主键ID", hidden = true)
    private Long id;

    @ApiModelProperty(value = "公司名称", required = true)
    @NotEmpty(message = "公司名称不可为空", groups = {Add.class, Update.class})
    @Size(max = 50, message = "公司名称最大字符长度50", groups = {Add.class, Update.class})
    private String companyName;

    @ApiModelProperty(value = "联系人")
    @Size(max = 50, message = "联系人最大字符长度50", groups = {Add.class, Update.class})
    private String linkman;

    @ApiModelProperty(value = "联系方式", required = true)
    @NotEmpty(message = "联系方式不可为空", groups = {Add.class, Update.class})
    @Size(max = 50, message = "联系方式最大字符长度50", groups = {Add.class, Update.class})
    private String contact;

    @ApiModelProperty(value = "地点", required = true)
    @NotEmpty(message = "地点不可为空", groups = {Add.class, Update.class})
    @Size(max = 255, message = "地点最大字符长度255", groups = {Add.class, Update.class})
    private String address;
}
